package com.lzb.musicplayer.utils;

import android.app.Activity;
import android.widget.Toast;


import com.lzb.musicplayer.bean.MusicFile;

import java.util.List;

public class SaveListUtils {


    public static void saveLbList(Activity activity, List<MusicFile> list) {
        //添加到播放列表
        List<MusicFile> list1 = SpUtils.getInstance().getList("listlb");
        list1.addAll(list);
        SpUtils.getInstance().putList("listlb", list1);
        Toast.makeText(activity, "添加到播放列表", Toast.LENGTH_SHORT).show();
    }

    public static void saveDlList(Activity activity, List<MusicFile> list) {
        List<MusicFile> list1 = SpUtils.getInstance().getList("listdl");
        list1.addAll(list);
        SpUtils.getInstance().putList("listdl", list1);
        Toast.makeText(activity, "添加到播放队列", Toast.LENGTH_SHORT).show();
    }
}
